< previous page page_365 next page >

Page 365
PRACTICAL GUIDELINES FOR IMPLEMENTING THE REPORTING AND PRINTING SUBSYSTEM
Perhaps the easiest and most extensible way to implement a reporting mechanism is Microsoft Access. It is very powerful, and it works extremely well with Visual Basic as both implement Microsoft's ActiveX/COM+ architecture. Nevertheless, it is straightforward to replace the implementation of the IReporting interface class with CrystalReporting or RichTextReporting if your customers have needs that demand one of these approaches. The beauty of this subsystem is that its basic interface and structure don't change with different implementations. Simply pull out one of the implementation classes and replace it with another that adheres to the IReporting interface.

Incorporating the Subsystem into the Samsona Bank Teller System Example
The branch manager requires only that accounts that required Cash Deposit Records be printed. She has decided that if any bank examiners or auditors need to see other information, they should pester the database administrator for the information. The format of the report should be simple, including only four columns:
9f8044bafea36a1f728739c0bb58ef4c.gif
Account Number
9f8044bafea36a1f728739c0bb58ef4c.gif
Customer First Name
9f8044bafea36a1f728739c0bb58ef4c.gif
Customer Middle Initial
9f8044bafea36a1f728739c0bb58ef4c.gif
Customer Last Name
You decide to implement RichTextReporting. Because you see a need for a class that would handle the formatting of the Rich Text Box separately, you create a RichTextFormatting class. You also create a Customer class with a corresponding AllCustomers collection. The collection is helpful for queuing many customers and their account numbers, or retrieving the account information from the database if you store Cash Deposit Record accounts there. The Customer class has the following properties:
AccountNumber As String 'local copy
CustomerID As String 'local copy
FirstName As String 'local copy
LastName As String 'local copy
MiddleInitial As String 'local copy

 
< previous page page_365 next page >

If you like this book, buy it!